/**
 * 宿舍基础逻辑
 * */
import http from './request.js'
export default {
	name: 'dormMixins',
	methods: {
		/**
		 * 获取楼栋
		 * */
		async fetchBuild(params) {
			let resp = await http.post({
				url: `/stu/DormBdMgr/page`,
				data: params
			});
			return resp.result.rows;
		},
		/**
		 * 获取楼层
		 * */
		async fetchFloor(params) {
			let resp = await http.post({
				url: `/stu/DormFloorMgr/page`,
				data: params
			});
			return resp.result.rows;
		},
		/**
		 * 获取房间
		 * */
		async fetchRoom(params) {
			let resp = await http.post({
				url: `/stu/DormRoomMgr/page`,
				data: params
			});
			return resp.result.rows;
		},
		/**
		 * 获取宿舍学生信息
		 * */
		async fetchRoomStu(params) {
			let resp = await http.post({
				url: `/stu/studentDormitoryMgr/weChat/page`,
				data: params
			});
			return resp.result;
		},
		/**
		 * 保存宿舍学生查寝信息
		 * */
		async saveRoomStuAct(list) {
			let resp = await http.post({
				url: `/stu/studentDormitoryMgr/weChat/saveStuMgrStatus`,
				data: JSON.stringify(list),
				header: {
					'content-type': 'application/json;charset=UTF-8'
				}
			});
			return resp;
		},
	}
}